#include<iostream>
using namespace std;
const int N = 1e5 + 10;
int tree[N];
int arr[N];
int ans[N];
int n;

int lowbit(int x)
{
	return x & -x;
}

void add(int x, int c)
{
	for (int i = x; i <= n; i += lowbit(i)) {
		tree[i] += c;
	}
}

int sum(int x)
{
	int res = 0;
	for (int i = x; i; i -= lowbit(i)) {
		res += tree[i];
	}
	return res;
}
int main()
{
	cin >> n;
	add(1, 1);
	for (int i = 2; i <= n; i++) {
		cin >> arr[i];
		add(i, 1);
	}
	for (int i = n; i >= 1; i--) {
		int k = arr[i] + 1;
		int l = 1;
		int r = n;
		while (l < r) {
			int mid = l + r >> 1;
			if (sum(mid) >= k) {
				r = mid;
			}
			else {
				l = mid + 1;
			}
		}
		ans[i] = r;
		add(r, -1);
	}
	for (int i = 1; i < n + 1; i++) {
		cout << ans[i] << endl;
	}
	return 0;
}